<?php
    class sscls_DateUtils
    {
        private $calendar_day; 
        private $calendar_month;

        function __construct()
        {
            $this->calendar_day=array("" ,"Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag");
            $this->calendar_month=array("","Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December");
        }

        function getFullDayName($dateVal)
        {               
            return $this->calendar_day[floor(date('N',$dateVal))];  
        }

        function getFullMonthName($dateVal)
        {
            return $this->calendar_month[floor(date('n',$dateVal))];
        }
        
        function getFullDate($dateVal)
        {
            $thur=$this->getFullDayName($dateVal);
            
            $day=date('d',$dateVal);
            
            $month=$this->getFullMonthName($dateVal);
            
            $year=date('Y',$dateVal);
            
            return $thur.', '.$month.', '.$day.', '.$year;
            
        }
        
        function checkHourValue($val)
        {
            $val=(int)($val/1);
            if($val>=24)
                return 23; 
            if($val<10)
                return '0'.$val;
            return $val;           
        }
        
        function checkMinuteValue($val)
        {
            $val=(int)($val/1);            
            if($val>=60)
                return 59; 
            if($val<10)
                return '0'.$val;
            return $val;                                
        }
    }
?>
